package com.teach;

import java.util.Set;
import java.util.TreeSet;
import java.util.concurrent.ThreadLocalRandom;

public class Demo0104 {

	private static final ThreadLocalRandom r = ThreadLocalRandom.current();// 多线程随机数 ;直译 : 线程本地随机数

	public static void main(String[] args) {
		for (int x = 0; x < 100; x++) {
			int blue = 0;
			Set<Integer> red = new TreeSet<Integer>((a,b)->a-b);

			blue = r.nextInt(16) + 1;
			
			while(red.size()<6) {
				red.add(r.nextInt(33)+1);
			}


			System.out.println("蓝球:" + blue);
			System.out.println("红球:" + red);
		}
	}

}
